<?php
    class Widget_Util{

        static public function randString($length = 6){
            $char = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghicklmnopqrstuvwxyz1234567890';
            if( intval($length) <= 0 )$length = 6;
            for($i=1; $i <= $length; $i++){
                $ret .= $char[rand(0,strlen($char))];
            }
            return $ret;

        }
    }
?>
